<template>
	<div class="achimentBox">
		<svg
			t="1667565457191"
			class="icon"
			viewBox="0 0 1024 1024"
			version="1.1"
			xmlns="http://www.w3.org/2000/svg"
			p-id="3708"
			width="30"
			height="30"
			v-if="isChamp">
			<path
				d="M493.269333 896.64L404.053333 940.245333a42.666667 42.666667 0 0 1-56.448-18.346666l-46.549333-87.722667a42.709333 42.709333 0 0 0-30.336-22.016l-97.792-17.152a42.666667 42.666667 0 0 1-34.858667-48l13.909334-98.304a42.666667 42.666667 0 0 0-11.562667-35.626667l-69.034667-71.381333a42.666667 42.666667 0 0 1 0-59.349333l69.034667-71.381334a42.624 42.624 0 0 0 11.562667-35.626666l-13.909334-98.346667a42.666667 42.666667 0 0 1 34.901334-48l97.792-17.152c12.970667-2.261333 24.149333-10.410667 30.336-22.016l46.549333-87.722667a42.624 42.624 0 0 1 56.405333-18.346666l89.216 43.605333c11.818667 5.76 25.642667 5.76 37.461334 0l89.216-43.605333a42.666667 42.666667 0 0 1 56.448 18.346666l46.549333 87.722667c6.186667 11.605333 17.365333 19.754667 30.336 22.016l97.792 17.152a42.666667 42.666667 0 0 1 34.858667 48l-13.909334 98.304a42.666667 42.666667 0 0 0 11.562667 35.626667l69.034667 71.381333a42.666667 42.666667 0 0 1 0 59.349333l-69.034667 71.381334a42.624 42.624 0 0 0-11.562667 35.626666l13.909334 98.304a42.666667 42.666667 0 0 1-34.858667 48l-97.792 17.152a42.709333 42.709333 0 0 0-30.336 22.016l-46.549333 87.722667a42.666667 42.666667 0 0 1-56.448 18.346667l-89.216-43.605334a42.624 42.624 0 0 0-37.461334 0.042667z"
				fill="#F5CF41"
				p-id="3709"></path>
			<path
				d="M512 832a320 320 0 1 1 0-640 320 320 0 0 1 0 640z m0-42.666667a277.333333 277.333333 0 1 0 0-554.666666 277.333333 277.333333 0 0 0 0 554.666666z"
				fill="#EEC437"
				p-id="3710"></path>
			<path
				d="M360.021333 386.432l59.946667 76.288a8.533333 8.533333 0 0 0 13.44 0L505.301333 371.2a8.533333 8.533333 0 0 1 13.44 0l71.808 91.52a8.533333 8.533333 0 0 0 13.44 0l60.074667-76.330667a8.533333 8.533333 0 0 1 11.989333-1.408 8.490667 8.490667 0 0 1 3.2 7.68l-24.96 214.357334H369.792l-24.96-214.314667a8.533333 8.533333 0 0 1 15.189333-6.272z"
				fill="#FFF2A0"
				p-id="3711"></path>
			<path
				d="M383.36 634.197333h257.28c7.509333 0 13.568 6.058667 13.568 13.568v15.530667a13.568 13.568 0 0 1-13.568 13.568h-257.28a13.568 13.568 0 0 1-13.568-13.568v-15.530667c0-7.509333 6.058667-13.568 13.568-13.568z"
				fill="#FBE975"
				p-id="3712"></path>
		</svg>
		<svg
			t="1667563410305"
			class="icon"
			viewBox="0 0 1024 1024"
			version="1.1"
			xmlns="http://www.w3.org/2000/svg"
			p-id="6635"
			width="25"
			height="25"
			v-if="isVictory">
			<path
				d="M512 0C229.677714 0 0 229.677714 0 512s229.677714 512 512 512 512-229.677714 512-512S794.322286 0 512 0z m104.114286 382.016l166.633143-166.624a18.281143 18.281143 0 1 1 25.860571 25.860571l-166.633143 166.624a18.226286 18.226286 0 0 1-12.928 5.353143 18.281143 18.281143 0 0 1-12.928-31.213714z m43.529143 545.805714c-17.778286 40.836571-49.321143 63.410286-89.257143 63.410286-282.322286 0-512-229.677714-512-512 0-36.928 17.997714-67.373714 50.788571-87.963429C161.202286 218.034286 322.057143 91.428571 512 91.428571a18.285714 18.285714 0 1 1 0 36.571429c-162.203429 0-300.918857 101.248-357.097143 243.730286 83.437714-22.660571 208.731429-2.322286 311.259429 63.84L512 342.678857l49.76 100.841143 111.268571 16.16-80.521142 78.482286 5.805714 33.837714c63.222857 102.322286 88.845714 226.212571 74.016 311.963429C814.272 824.608 914.285714 684.374857 914.285714 521.142857a18.285714 18.285714 0 0 1 18.285715-18.285714 18.285714 18.285714 0 0 1 18.285714 18.285714c0 188.48-122.043429 348.909714-291.213714 406.674286z"
				fill="#FD5A5A"
				p-id="6636"></path>
			<path
				d="M502.857143 932.571429a18.285714 18.285714 0 0 1 18.285714-18.285715 390.834286 390.834286 0 0 0 151.186286-30.322285c14.829714-85.750857-10.793143-209.641143-74.016-311.963429l13.206857 76.982857L512 596.662857l-99.529143 52.32 19.012572-110.820571-80.512-78.482286 111.268571-16.16 3.922286-7.949714C363.634286 369.408 238.340571 349.074286 154.902857 371.730286 137.750857 415.250286 128 462.464 128 512a18.285714 18.285714 0 0 1-18.285714 18.285714 18.285714 18.285714 0 0 1-18.285715-18.285714c0-41.965714 6.262857-82.468571 17.750858-120.731429-32.795429 20.589714-50.793143 51.035429-50.793143 87.963429 0 282.322286 229.677714 512 512 512 39.936 0 71.478857-22.573714 89.257143-63.410286A427.570286 427.570286 0 0 1 521.142857 950.857143a18.285714 18.285714 0 0 1-18.285714-18.285714z m-117.828572-256.786286l-147.748571 147.748571a18.230857 18.230857 0 0 1-12.932571 5.357715 18.281143 18.281143 0 0 1-12.928-31.213715l147.748571-147.748571a18.276571 18.276571 0 0 1 25.860571 0 18.276571 18.276571 0 0 1 0 25.856z"
				fill="#FE7D71"
				p-id="6637"></path>
			<path
				d="M350.971429 459.68l80.512 78.482286-19.012572 110.820571L512 596.662857l99.52 52.32-13.211429-76.982857-5.801142-33.837714 80.521142-78.482286-111.268571-16.16L512 342.674286l-45.837714 92.896-3.922286 7.949714z"
				fill="#D8F768"
				p-id="6638"></path>
			<path
				d="M932.571429 502.857143a18.285714 18.285714 0 0 0-18.285715 18.285714c0 163.232-100.018286 303.465143-241.956571 362.820572A390.834286 390.834286 0 0 1 521.142857 914.285714a18.285714 18.285714 0 1 0 0 36.571429c48.457143 0 95.008-8.182857 138.500572-23.04C828.813714 870.057143 950.857143 709.622857 950.857143 521.142857a18.285714 18.285714 0 0 0-18.285714-18.285714zM109.714286 530.285714a18.285714 18.285714 0 0 0 18.285714-18.285714c0-49.536 9.750857-96.749714 26.902857-140.269714C211.081143 229.248 349.796571 128 512 128a18.285714 18.285714 0 1 0 0-36.571429c-189.942857 0-350.802286 126.605714-402.820571 299.84A419.067429 419.067429 0 0 0 91.428571 512a18.285714 18.285714 0 0 0 18.285715 18.285714zM629.046857 413.229714c4.676571 0 9.353143-1.782857 12.928-5.353143l166.628572-166.628571a18.281143 18.281143 0 1 0-25.856-25.856l-166.628572 166.628571a18.281143 18.281143 0 0 0 12.928 31.209143zM359.168 649.929143l-147.748571 147.748571a18.281143 18.281143 0 1 0 25.856 25.856l147.748571-147.748571a18.276571 18.276571 0 0 0 0-25.856 18.276571 18.276571 0 0 0-25.856 0z"
				fill="#FFDC82"
				p-id="6639"></path>
		</svg>
		<svg
			t="1667565570429"
			class="icon"
			viewBox="0 0 1024 1024"
			version="1.1"
			xmlns="http://www.w3.org/2000/svg"
			p-id="8550"
			width="30"
			height="30"
			v-if="isStar">
			<path
				d="M499.88608 787.93728l-183.3984 96.41984a30.72 30.72 0 0 1-44.57472-32.37888l35.0208-204.22656a30.72 30.72 0 0 0-8.82688-27.1872l-148.3776-144.64a30.72 30.72 0 0 1 17.01888-52.39808l205.056-29.7984a30.72 30.72 0 0 0 23.13216-16.7936l91.6992-185.81504a30.72 30.72 0 0 1 55.0912 0L633.4464 376.9344a30.72 30.72 0 0 0 23.12192 16.7936l205.056 29.7984a30.72 30.72 0 0 1 17.02912 52.39808l-148.3776 144.64a30.72 30.72 0 0 0-8.83712 27.1872l35.0208 204.22656a30.72 30.72 0 0 1-44.56448 32.37888l-183.3984-96.41984a30.72 30.72 0 0 0-28.60032 0z"
				fill="#FECD34"
				p-id="8551"></path>
			<path
				d="M140.4928 449.9456l373.68832 81.87904-234.79296 343.7568a30.78144 30.78144 0 0 1-7.4752-25.78432l35.0208-204.22656a30.72 30.72 0 0 0-8.82688-27.19744l-148.3776-144.62976a30.64832 30.64832 0 0 1-9.22624-23.808zM887.6032 456.16128a30.72 30.72 0 0 1-8.96 17.58208l-148.3776 144.62976a30.72 30.72 0 0 0-8.83712 27.19744l35.0208 204.22656a30.72 30.72 0 0 1-13.74208 31.08864L514.18112 531.82464l371.97824-90.33728c1.61792 4.5568 2.18112 9.56416 1.4336 14.67392z"
				fill="#FEA935"
				p-id="8552"></path>
			<path
				d="M185.98912 288.12288l-53.57568-21.12512a20.48 20.48 0 0 1 0-38.10304l53.57568-21.13536a20.48 20.48 0 0 0 11.53024-11.53024l21.13536-53.57568a20.48 20.48 0 0 1 38.0928 0l21.13536 53.57568a20.48 20.48 0 0 0 11.54048 11.53024l53.57568 21.13536a20.48 20.48 0 0 1 0 38.0928l-53.57568 21.13536a20.48 20.48 0 0 0-11.54048 11.54048l-21.12512 53.57568a20.48 20.48 0 0 1-38.10304 0l-21.13536-53.57568a20.48 20.48 0 0 0-11.53024-11.54048zM728.70912 288.12288l-53.57568-21.12512a20.48 20.48 0 0 1 0-38.10304l53.57568-21.13536a20.48 20.48 0 0 0 11.53024-11.53024l21.13536-53.57568a20.48 20.48 0 0 1 38.0928 0l21.13536 53.57568a20.48 20.48 0 0 0 11.54048 11.53024l53.57568 21.13536a20.48 20.48 0 0 1 0 38.0928l-53.57568 21.13536a20.48 20.48 0 0 0-11.54048 11.54048l-21.12512 53.57568a20.48 20.48 0 0 1-38.10304 0l-21.13536-53.57568a20.48 20.48 0 0 0-11.53024-11.54048z"
				fill="#FECD34"
				p-id="8553"></path>
		</svg>
	</div>
</template>

<script>
	export default {
		name: 'AchimentBox',
		data() {
			return {
				isVictory: false,
				isStar: false,
				isChamp: false,
			};
		},
		props: {
			data: Object,
		},
		methods: {
			backHome() {
				this.$router.push({
					name: 'homepage',
				});
			},
		},
		mounted() {
			console.log(this.data);
			if (this.data.score > 2048) this.isVictory = true;
			if (this.data.score > 1024) this.isStar = true;
			if (this.data.ranks === 1) this.isChamp = true;
		},
	};
</script>

<style scoped>
	.achimentBox {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
	}
	.achimentBox svg {
		margin: 0 2px;
	}
</style>
